const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
<<<<<<< HEAD
   // transpileDependencies: true,
   publicPath: "/xjqxzh",
   lintOnSave: process.env.NODE_ENV === 'development',
   // publicPath: "/zhzs", //process.env.VUE_APP_SUB_PATH || 
   // 在npm run build 或 yarn build 时 ，生成文件的目录名称（要和baseUrl的生产环境路径一致）（默认dist）
   outputDir: 'xjqxzh',
   assetsDir: 'static',
=======
  // transpileDependencies: true,
  publicPath: "/xjqxzh",
  lintOnSave: process.env.NODE_ENV === 'development',
  // publicPath: "/zhzs", //process.env.VUE_APP_SUB_PATH || 
  // 在npm run build 或 yarn build 时 ，生成文件的目录名称（要和baseUrl的生产环境路径一致）（默认dist）
  outputDir: 'xjqxzh',
  assetsDir: 'static',
>>>>>>> 628766336a74a0e122019c8bfb74f9df506eb741
  productionSourceMap: false,
  devServer: {
      host: '0.0.0.0',
      // port: port,
      open: false,
      proxy: {
         
          [process.env.VUE_APP_BASE_API + "/fxyjyb"]: {
              target: "http://192.168.0.21:8888",
              // target: "http://192.168.0.13:8888",
              // target: "http://10.185.21.14:8888",
              changeOrigin: true,
              pathRewrite: {
                  ['^' + process.env.VUE_APP_BASE_API + "/fxyjyb"]: ''
              },
          },
<<<<<<< HEAD
         
     
=======
        
>>>>>>> 628766336a74a0e122019c8bfb74f9df506eb741
      [process.env.VUE_APP_BASE_API + "/dmgis"]: {
        target: 'http://192.168.0.14:8808',
        // target: 'http://10.185.99.42:8808',//服务器
        changeOrigin: true,
        pathRewrite: {
            ['^' + process.env.VUE_APP_BASE_API + "/dmgis"]: ''
        }, onProxyRes(proxyRes, req, res) {
            const realUrl = req.url || ''; // 确保这里只包含有效的URL字符
            proxyRes.headers['A-Real-Url'] = realUrl; // 添加响应头
        },
    },
   
      },
      allowedHosts: 'all',
  },
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
        @import "@/assets/css/mixin.scss";
        @import "@/assets/css/variable.scss";
        `,
      },
    },
  },
})

